<?php

/**
 * Faculty form.
 *
 * @package    Amman to London
 * @subpackage form
 * @author     Adel Abu-Saif <adeljas@msn.com>
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class FacultyForm extends BaseFacultyForm {

    public function configure() {
        $this->widgetSchema['name_en']->setLabel('Name [ English ]');
        $this->widgetSchema['name_ar']->setLabel('Name [ Arabic ]');
//        $this->widgetSchema['brief_en']->setLabel('Brief [ English ]');
//        $this->widgetSchema['brief_ar']->setLabel('Brief [ Arabic ]');
        if (!$this->object->isNew()) {
            sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url'));

            $this->widgetSchema['courses'] = new asWidgetFormCustomTag(array(
                        'html' => '<a onclick=\'window.open(this.href,"edit courses","width=700,height=500");return false;\' href="' . url_for('course_faculty/filter?course_faculty.filters[faculty_id]=' . $this->getObject()->getId()) . '">Edit Courses</a>'
                    ));
        }
    }

}
